//
// Created by PC on 2024/7/12.
//


#include <iostream>
#include <vector>

using namespace std;

int findMax(vector<int> v, int l, int r)
{
    if (l==r)
        return v[l];
    int m = (l+r)/2;
    cout<< l<<' '<<m<<' '<<r<<endl;
    int left= findMax(v,l,m);
    int right= findMax(v,m+1,r);
    return max(left,right);
}
int main()
{
    vector<int> l{2,5,7,5,9,1,0,8};
    cout<<findMax(l,0,l.size()-1);
    return 0;
}